package com.sh.demo;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisShardInfo;

public class ceshiredis {
    public static void main(String[] args) {
        String hostA="8.131.93.212";
        int portA=6379;
        JedisShardInfo jedisShardInfo = new JedisShardInfo(hostA, portA);
        jedisShardInfo.setPassword("123456");
        Jedis jedis = new Jedis(jedisShardInfo);
        System.out.println(jedis.ping());

    }

}
